﻿using System;
using System.Collections.Generic;

using System.Web.UI;

namespace KamLib
{
    public class UilViewPage<TController> : Page, IUilView
        where TController : UilController
    {
        public UilController Controller { get; set; }
        public IList<IUilViewPart> Parts { get; set; }
        public void AdaptToController() { }

        protected override void OnLoad(EventArgs e)
        {
            UilView.InitAsMain<TController>(this);

            var dbuMsg = Application["dbUpdateMsg"] as string;
            if (dbuMsg != null)
            {
                Application.Remove("dbUpdateMsg");
                DbUpdater.ShowNotification(dbuMsg);
            }

        }
    }

}
